<?php
/**
 * @version 0.8.3 2010-10-07
 * @package Joomla
 * @subpackage LeagueResults
 * @copyright (C)  2008, 2009, 2010 Henryk Drozd
 * @license GNU/GPL, see LICENSE.php
 * LeagueResults is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.

 * LeagueResults is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

defined('_JEXEC') or die('Restricted access');


class lrAdmin {


	function _getversion()
	{
	$xmlfile = JPATH_COMPONENT_ADMINISTRATOR.DS.'lr.xml';
		if (file_exists($xmlfile)) {

			$xmlDoc = new JSimpleXML();
			$xmlDoc->loadFile($xmlfile);
		

			return $xmlDoc->document->version[0]->_data;
		}
	}
	
	function footer( )
	{
		
		echo '<a href="http://league-results.pl">League Results v.';
		echo lrAdmin::_getversion();
		
		echo ' by Henryk Drozd</a>';

	}

	function config()
	{
		$db =& JFactory::getDBO();

		$sql = 'SELECT * FROM #__lr_settings WHERE id = 1';
		$db->setQuery($sql);
		$config = $db->loadObject();

		return $config;
	}
}

?>